package com.llh.designpatterns.singleton.lazy;

/**
 * <h2>懒汉单例</h2>
 * <p>使用静态内部类实现</p>
 * <p>线程安全，延迟加载，效率高</p>
 * <p>推荐使用</p>
 * <p>CreatedAt: 2019-11-23 20:46</p>
 * <p><a href="mailto:forever2y_y@163.com">SendMailToMe</a></p>
 *
 * @author llh
 */
class Singleton03 {

    private Singleton03() {
    }

    private static class SingleInstance {
        private static final Singleton03 INSTANCE = new Singleton03();
    }

    static Singleton03 getInstance() {
        return SingleInstance.INSTANCE;
    }
}
